<template>
  <el-dialog
    append-to-body
    top="30px"
    v-bind="$attrs"
    :before-close="beforeClose"
    :title="title"
    :close-on-click-modal="false"
    :visible.sync="visible"
  >
    <select-access-bank v-bind="$attrs" v-on="$listeners"></select-access-bank>
    <slot name="footer">
      <div class="text-center mt-3">
        <el-button type="primary" class="btn-long" @click="$emit('save')">保存</el-button>
        <el-button class="btn-long" @click="beforeClose">取消</el-button>
      </div>
    </slot>
  </el-dialog>
</template>

<script>
import SelectAccessBank from '@/credit/components/select/SelectAccessBank'

export default {
  components: {
    SelectAccessBank,
  },
  props: {
    visible: Boolean,
    title: {
      type: String,
      default: '选择机构',
    },
  },
  model: {
    prop: 'value',
    event: 'change',
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
  },
}
</script>

<style lang="scss" scoped></style>
